import store from '@/store/index.js'

//	抖音登录
export const doLogin = (data) => {
	return uni.$u.post('/index/login/dyLogin', data)
}

//	微信登录
export const dowxLogin = (data) => {
	return uni.$u.post('/index/login/wxLogin', data)
}
//	快手登录
export const kswxLogin = (data) => {
	return uni.$u.post('/index/login/ksLogin', data)
}
//	注册
export const doRegister = (data) => {
	return uni.$u.post('/index/login/testWxBindPhoneRegister', data)
}
//	隐私协议
export const testPolicyAndAgreement = (data) => {
	return uni.$u.post('/index/login/testPolicyAndAgreement', data)
}

export const doInfo = () => {
	return uni.$u.get('/index/user/info')
}
//客服电话
export const hotLine = () => {
	return uni.$u.get('/index/index/hotLine')
}
//	获取最近门店
export const doMendian = (data) => {
	return uni.$u.post('index/store/getNearbyStore', data)
}

//	获取门店信息
export const doMendianInfo = (data) => {
	return uni.$u.post('index/store/storeInfo', data)
}

export const doEditInfo = (data) => {
	return uni.$u.post('/index/user/editInfo', data)
}

export const doUpdateIdealInfo = (data) => {
	return uni.$u.post('/index/user/updateIdealInfo', data)
}


export const doVersion = (data) => {
	return uni.$u.post('/index/home/checkVersion', {
		version: store.getters['app/version']
	})
}

export const doQrImg = () => {
	return uni.$u.post('/index/dy/shareQr')
}